Conversation
- context that carry client / catalog / query / parametes - also client now gets his own context that can be merged with row mapper context
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 1.x #2313 +/- ##
==========================================
+ Coverage 84.04% 84.26% +0.21%
==========================================
Files 1530 1535 +5
Lines 57705 57829 +124
==========================================
+ Hits 48501 48728 +227
+ Misses 9204 9101 -103 🚀 New features to boost your workflow:
|
| ?Query $query = null, | ||
| ?Client $client = null, | ||
| ?ClientContext $clientContext = null, | ||
| ) : Context { | ||
| return new Context( | ||
| $query ?? new Query('SELECT 1'), | ||
| $client ?? new StubClient(), | ||
| $clientContext ?? new ClientContext(), |
There was a problem hiding this comment.
| ?Query $query = null, | |
| ?Client $client = null, | |
| ?ClientContext $clientContext = null, | |
| ) : Context { | |
| return new Context( | |
| $query ?? new Query('SELECT 1'), | |
| $client ?? new StubClient(), | |
| $clientContext ?? new ClientContext(), | |
| Query $query = new Query('SELECT 1'), | |
| Client $client = new StubClient(), | |
| ClientContext $clientContext = new ClientContext(), | |
| ) : Context { | |
| return new Context( | |
| $query, | |
| $client, | |
| $clientContext, |
There was a problem hiding this comment.
it's cosmetic, irrelevant, if anything maybe rector could enforce the style here but in general there are places among the codebase that does the same
| ); | ||
| } | ||
|
|
||
| public static function with( |
There was a problem hiding this comment.
Also by default any() and with() do the same.
There was a problem hiding this comment.
yes and no, difference between with and any is that any should be used in the tests that arguments doesn't matter as they are not being used in the assertions.
With on the other hand should be used when arguments are in some way relevant to the test, but since not all of them always are required, for simplicity with takes all arguments optional
| { | ||
| return new self( | ||
| catalog: $other->catalog ?? $this->catalog, | ||
| data: \array_replace($this->data, $other->data), |
There was a problem hiding this comment.
Sure it should do replace? Method says merge.
There was a problem hiding this comment.
yes, thats what array_replace does:
array_replace() creates a new array and assigns items into it for each key in each of the provided arrays. If a key appears in multiple input arrays, the value from the right-most input array will be used.
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security